package com.yanqu.road.server.cmd.activity.huashigang;

import com.yanqu.road.pb.huashigang.HuaShiGangProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.cross.battle.HuaShiGangMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_HUA_SHI_GANG_ELITE_RANK, desc = "花石纲精英怪伤害奖励排行")
public class CrossGetEliteMonsterDamageListCmd extends CrossCommand {

    // 活动ID
    private int activityId;

    // 精英怪Y坐标
    private int y;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        HuaShiGangProto.CrossGetEliteRankListReqMsg req = HuaShiGangProto.CrossGetEliteRankListReqMsg.parseFrom(packet.getBytes());
        activityId = req.getActivityId();
        y = req.getY();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        HuaShiGangMgr.getEliteMonsterDamageRank(activityId, serverId, packet.getPlayerId(), y);
    }

    @Override
    public void sendData() {

    }
}
